package com.nbsaas.boot.marketing.rest.convert;

import com.nbsaas.boot.marketing.data.entity.Promotion;
import com.nbsaas.boot.marketing.api.domain.simple.PromotionSimple;

import com.nbsaas.boot.rest.api.Converter;

/**
* 促销活动-列表对象转换器
*/

public class PromotionSimpleConvert implements Converter<PromotionSimple, Promotion> {




@Override
public PromotionSimple convert(Promotion source) {
    PromotionSimple result = new PromotionSimple();

                result.setCode(source.getCode());
                result.setCurrentParticipants(source.getCurrentParticipants());
                result.setDescription(source.getDescription());
                result.setRules(source.getRules());
                result.setType(source.getType());
                result.setPriority(source.getPriority());
                result.setAddDate(source.getAddDate());
                result.setMaxParticipants(source.getMaxParticipants());
                result.setName(source.getName());
                result.setStartTime(source.getStartTime());
                result.setEndTime(source.getEndTime());
                result.setId(source.getId());
                result.setStatus(source.getStatus());
                result.setLastDate(source.getLastDate());


    return result;
}

}